#include<stdio.h>

char change(char c, int n)
{
    char key=1;
    key<<=n;
    if(key&c)  c=c&~key;
    else       c=c|key;
    return c;
}

int main()
{
    char c = 0;
    int n = 0;
    scanf("%c",&c);
    getchar();
    scanf("%d",&n);
    c=change(c, n);
    printf("%c\n",c);
    return 0;
}